package org.penguin.study.bk.jackson.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.penguin.study.bk.base.json.CustomerDoubleSerialize;

import java.time.LocalDate;
import java.util.Date;

@Data
public class User {

    private String id;

    private LocalDate birthday = LocalDate.of(1978,2,4);

    @JsonProperty("Salary")
    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double salary = 19999.4567;

    @JsonSerialize(using = CustomerDoubleSerialize.class)
    public Double getSalaryDemo() {
        return 19999.4563;
    }

    private Date createdTime = new Date();

}
